package com.example.yywebflux01;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import reactor.core.publisher.Flux;

import java.math.BigDecimal;
import java.time.Duration;

@SpringBootApplication
public class YyWebflux01Application {

    public static void main(String[] args) {
        SpringApplication.run(YyWebflux01Application.class, args);

        Flux.interval(Duration.ofSeconds(1))
                .map(i -> i*10)
                .subscribe((item)->{System.out.println(item + "---" + Thread.currentThread().getName());});
        System.out.println("Exiting the application...1");
        System.out.println("Exiting the application...2");
        System.out.println("Exiting the application..." + Thread.currentThread().getName());


    }

}
